/* 商品 */
import { getStorage, setStorage, storePasted, setStoreTime } from '@/utils/storage'

const mockData = [
  { id: 1, name: '颜料', type: 'tool', img: 'https://aha-public-1301319986.cos.ap-shanghai.myqcloud.com/static_file/yuping/commodities/20220312090723420-Rectangle 13.png' },
  { id: 2, name: '纸灯笼', type: 'materials', img: 'https://aha-public-1301319986.cos.ap-shanghai.myqcloud.com/static_file/yuping/commodities/20220312090723419-Rectangle 14.png' },
  { id: 3, name: '原木切片', type: 'materials', img: 'https://aha-public-1301319986.cos.ap-shanghai.myqcloud.com/static_file/yuping/commodities/20220312090723419-Rectangle 15.png' },
  { id: 4, name: '纽扣', type: 'materials', img: 'https://aha-public-1301319986.cos.ap-shanghai.myqcloud.com/static_file/yuping/commodities/20220312090723418-Rectangle 16.png' },
  { id: 5, name: '绸缎丝带', type: 'tool', img: 'https://aha-public-1301319986.cos.ap-shanghai.myqcloud.com/static_file/yuping/commodities/20220312090723420-Rectangle 64.png' },
  { id: 6, name: '线', type: 'tool', img: 'https://aha-public-1301319986.cos.ap-shanghai.myqcloud.com/static_file/yuping/commodities/20220312090723420-Rectangle 61.png' },
  { id: 7, name: '积木', type: 'materials', img: 'https://aha-public-1301319986.cos.ap-shanghai.myqcloud.com/static_file/yuping/commodities/20220312090723420-Rectangle 62.png' },
  { id: 8, name: '螺丝钉', type: 'tool', img: 'https://aha-public-1301319986.cos.ap-shanghai.myqcloud.com/static_file/yuping/commodities/20220312090723420-Rectangle 63.png' },
  { id: 9, name: '陪伴模块定制', type: 'customization', img: 'https://aha-public-1301319986.cos.ap-shanghai.myqcloud.com/static_file/yuping/20220506102439422-Group 199.png', cb: () => Vue.prototype.$pushTo('Customization', { demo: 'demo1' }) },
  { id: 10, name: '玩具舞台', type: 'customization', img: 'https://aha-public-1301319986.cos.ap-shanghai.myqcloud.com/static_file/yuping/20220506102439422-Group 198.png', cb: () => Vue.prototype.$pushTo('Customization', { demo: 'demo2' }) },
]

/* 初始化本地数据 */
if (storePasted()) {
  setStorage('commodities', JSON.stringify(mockData))
  console.log('重新缓存商品')
}
export default mockData
